package com.example.demos.web.controller;


import com.example.demos.service.EchartsService;
import com.example.demos.util.Result;
import com.example.demos.vo.EchartsByTpeVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class EchartsController {

    @Autowired
    private EchartsService echartsService;


    @GetMapping("/v2/echarts/byType")
    public Result<List<EchartsByTpeVO>> select(String year) {
        List<EchartsByTpeVO> select = echartsService.select(year);
        return Result.ok(select);
    }

}
